import math

from math import*

x,y,alpha=input('please input x,y,alpha:').split()

x=float(x)
y=float(y)
alpha=float(alpha)

alpha=alpha/180*math.pi

z=math.sqrt(x**2+y**2-2*x*y*math.cos(alpha))

k='{:4.3f}'.format(z)

print(float(k))

input('press any key to continue')
